Split target_os = "nto" cfg by env so io-sock variants use TCP_KEEPIDLE#654
Merged
Thomasdezeeuw merged 3 commits intorust-lang:masterfrom May 5, 2026
Merged
Conversation
QNX 8.0 (target_env = "nto80") ships only the io-sock network stack, which dropped TCP_KEEPALIVE in favour of the BSD-style TCP_KEEPIDLE. The same applies to QNX 7.1 with the optional io-sock stack (target_env = "nto71_iosock"). Only the legacy io-pkt envs (nto70, nto71) still expose TCP_KEEPALIVE. Restricting the existing target_os = "nto" arms in the two KEEPALIVE_TIME aliases to the io-pkt envs lets io-sock variants fall through to the BSD-style TCP_KEEPIDLE arm that already exists. Requires the matching libc change (rust-lang/libc#5071) to land for the new constants to be visible.
Darksonn
reviewed
May 3, 2026
Comment on lines
+301
to
+303
| // QNX legacy io-pkt stack (nto70, nto71) exposes TCP_KEEPALIVE. | ||
| // The newer io-sock stack (nto71_iosock, nto80) replaced it with the | ||
| // BSD-style TCP_KEEPIDLE — handle both branches below. |
Member
There was a problem hiding this comment.
This is not a great place for this comment. Either move it below or just remove it.
Collaborator
There was a problem hiding this comment.
I think we can just remove it.
Member
There was a problem hiding this comment.
Could we add the new QNX versions to CI so we actually build this stuff?
socket2/.github/workflows/main.yml
Lines 67 to 111 in 602e784
Thomasdezeeuw
approved these changes
May 4, 2026
Collaborator
Thomasdezeeuw
left a comment
There was a problem hiding this comment.
@skarlsson if you can fix the rustfmt issue, this LGTM.
Comment on lines
+301
to
+303
| // QNX legacy io-pkt stack (nto70, nto71) exposes TCP_KEEPALIVE. | ||
| // The newer io-sock stack (nto71_iosock, nto80) replaced it with the | ||
| // BSD-style TCP_KEEPIDLE — handle both branches below. |
Collaborator
There was a problem hiding this comment.
I think we can just remove it.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collaborator
|
Thanks @skarlsson |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
QNX 8.0 (target_env = "nto80") ships only the io-sock network stack, which dropped TCP_KEEPALIVE in favour of the BSD-style TCP_KEEPIDLE. The same applies to QNX 7.1 with the optional io-sock stack (target_env = "nto71_iosock"). Only the legacy io-pkt envs (nto70, nto71) still expose TCP_KEEPALIVE.
Restricting the existing target_os = "nto" arms in the two KEEPALIVE_TIME aliases to the io-pkt envs lets io-sock variants fall through to the BSD-style TCP_KEEPIDLE arm that already exists. Requires the matching libc change (rust-lang/libc#5071) to land for the new constants to be visible.